// import 'element-plus/dist/index.css'
import 'vant/lib/index.css';

import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from './App.vue'
import router from './router'
// 引入Vant
import Vant from 'vant'
import 'vant/lib/index.css'

// 引入全局样式
import './styles/index.scss'

const app = createApp(App)

//注册elementplus图标组件
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}

const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)
app.use(pinia)
app.use(router)
app.use(Vant)

app.mount('#app')